package com.matt;


import com.dotflat.fin.config.WxMaProperties;
import com.dotflat.fin.config.WxMpProperties;
import com.matt.components.converter.String2DateConverter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.scheduling.annotation.EnableScheduling;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication(scanBasePackages = {"com.matt", "com.dotflat"})
@EnableJpaRepositories(basePackages = {"com.matt", "com.dotflat"})
@EntityScan(basePackages = {"com.matt", "com.dotflat"})

@EnableConfigurationProperties({WxMaProperties.class, WxMpProperties.class})
@Slf4j
public class Application {

	@Bean
	public Converter converter() {
		return new String2DateConverter();
	}

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}

}
